From a010a1bfcd0126194f8516f8662b3584f236b866 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Mon, 27 Oct 2025 18:18:58 +0100 Subject: [PATCH] luci-mod-network: Allow the 'dns' entry under the DHCP tab to take IPv4+6 This option is used by odhcpd. It can take IPv4/6 entries, although IPv4 DNS servers don't always make sense in an IPv6 environment, they might in a dual stack environment. Entering an IPv4 here results in its distribution via IPv6. This option becomes more useful for both families when odhcpd handles IPv4+6. Signed-off-by: Paul Donald --- .../luci-static/resources/view/network/interfaces.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index a949ccb7b3..6db2df8a05 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -1009,9 +1009,12 @@ return view.extend({ so.datatype = 'range(1,62)'; so.depends('dhcpv6', 'server'); - so = ss.taboption('ipv6', form.DynamicList, 'dns', _('Announce IPv6 DNS servers'), - _('Specifies a fixed list of IPv6 DNS server addresses to announce via DHCPv6. If left unspecified, the device will announce itself as IPv6 DNS server unless the Local IPv6 DNS server option is disabled.')); - so.datatype = 'ip6addr("nomask")'; /* restrict to IPv6 only for now since dnsmasq (DHCPv4) does not honour this option */ + /* This option is used by odhcpd. It can take IPv4/6 entries, although IPv4 DNS servers don't + always make sense in an IPv6 environment, they might in a dual stack environment. */ + so = ss.taboption('ipv6', form.DynamicList, 'dns', _('Announce IPv4/6 DNS servers'), + _('Specifies a fixed list of DNS server addresses to announce via DHCPv6.') + '
' + + _('If left unspecified, the device will announce itself as DNS server unless the Local IPv6 DNS server option is disabled.')); + so.datatype = 'ipaddr("nomask")'; so.depends('ra', 'server'); so.depends({ ra: 'hybrid', master: '0' }); so.depends('dhcpv6', 'server'); -- 2.30.2